home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / program / ddj0897.zip / RCSC.ZIP / LIB51 / ISATTY.C < prev    next >
Text File  |  1997-01-12  |  391b  |  18 lines

  1. /*
  2. ** Return "true" if fd is a device, else "false"
  3. */
  4. isatty(fd) int fd; {
  5. fd;               /* fetch handle */
  6. #asm
  7.   push bx         ; save 2nd reg
  8.   mov  bx,ax      ; place handle
  9.   mov  ax,4400h   ; ioctl get info function
  10.   int 21h         ; call BDOS
  11.   pop  bx         ; restore 2nd reg
  12.   mov  ax,dx      ; fetch info bits
  13.   and  ax,80h     ; isdev bit
  14. #endasm
  15.   }
  16.  
  17.  
  18.